package com.itheima.service.impl;

import com.itheima.service.UserService;

import java.util.Arrays;

public class UserServiceImplB implements UserService {
    //目标2:通过构造函数给成员赋数据值
    private String username;
    private String password;
    private Boolean lock;
    private String[] hobby;

    public UserServiceImplB() {
    }

    public UserServiceImplB(String username, String password, Boolean lock, String[] hobby) {
        this.username = username;
        this.password = password;
        this.lock = lock;
        this.hobby = hobby;
    }

    @Override
    public void save() {
        System.out.println("UserServiceImplB.save");
    }

    @Override
    public String toString() {
        return "UserServiceImplB{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", lock=" + lock +
                ", hobby=" + Arrays.toString(hobby) +
                '}';
    }
}
